import type { App } from 'vue'
import { createPinia } from 'pinia'
// #ifdef H5
import { piniaPluginPersist } from './plugin/pinia-plugin-persist/pinia-plugin-persist'
// #endif

const store = createPinia()

export function setupStore(app: App<Element>) {
    // #ifdef H5
    store.use(piniaPluginPersist)
    // #endif
    app.use(store)
}

export { store }
